<template>
  <WaterfallFlowComponent :dataList="dataList">
    <template v-slot="{ row }">
      <div
        class="r_item"
        :style="{
          width: '100%',
          height: row.h + 'px',
          backgroundColor: '#ccc',
        }"
      >
        {{ row.w }}
      </div>
    </template>
  </WaterfallFlowComponent>
</template>

<script>
import { generateRandomData } from "./utils";
export default {
  name: "App",
  components: {},
  data() {
    return {
      dataList: [],
    };
  },
  mounted() {
    const data = generateRandomData(100);
    this.dataList = data;
    console.log("🚀 ~ mounted ~ data:", data);
  },
};
</script>

<style lang="less" scoped>
.r_item {
  margin-bottom: 10px;
}
</style>
